package notes.java.sjms23.s6_chain;
public class Client {

    public static void main(String[] args) {
        Leader groupLeader = new GroupLeader("组长小王");
        Leader managerLeader = new ManagerLeader("经理张三");
        Leader generalLeader = new GeneralManagerLeader("部门经理李总");

        // 责任链关系
        groupLeader.setNextLeader(managerLeader);
        managerLeader.setNextLeader(generalLeader);

        LeaveRequest req = new LeaveRequest("小张", 3, "回家探亲！！");
        LeaveRequest req2 = new LeaveRequest("小张", 5, "结婚！！");
        LeaveRequest req3 = new LeaveRequest("小张", 12, "事假");
        groupLeader.handleRequest(req);
        groupLeader.handleRequest(req2);
        groupLeader.handleRequest(req3);

    }

}